package com.ruoyi.web.controller.system;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.framework.web.service.WxLoginService;
import com.ruoyi.system.domain.WxLoginBody;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/system/wx")
public class SysWxLoginController {
    @Autowired
    private WxLoginService wxLoginService;

    /**
     * 微信登录方法
     */
    @PostMapping("/login")
    public AjaxResult wxLogin(@RequestBody WxLoginBody wxLoginBody) {
        return wxLoginService.wxLogin(wxLoginBody);
    }
}
